import request from '@/router/axios';

//运费结算单列表
export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-tms/statementorder/settlementSheet/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//确认运费
export const confirmShipping = (data) => {
    return request({
        url: '/api/blade-tms/statementorder/settlementSheet/confirmShipping',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//暂估
export const staging = (data) => {
    return request({
        url: '/api/blade-tms/statementorder/settlementSheet/staging',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//费用明细
export const getExpenseDetails = (current, size, params) => {
    return request({
        url: '/api/blade-tms/statementorder/settlementSheet/chargeDetails',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//结算单查询
export const getSettlementList = (current, size, params) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//发票查询
export const getSettlementDetail = (current, size, params) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/detail',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
//新增或修改发票
export const settlementSubmit = (data) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/submit',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//删除发票
export const settlementRemove = (ids) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/remove?ids=' + ids,
        method: 'post',
    })
}
//发票明细提交
export const submitSettlement = (no) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/refer?no=' + no,
        method: 'post',
    })
}
//上传凭证
export const uploadCertificate = (data) => {
    return request({
        url: '/api/blade-tms/statementorder/settlementSheet/uploadCertificate',
        method: 'post',
        data: {
            ...data,
        }
    })
}
//删除结算单
export const deleteStatement = (params) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/deleteStatement',
        method: 'get',
        params: {
            ...params,
        }
    })
}
//结算单发票明细
export const statementInvoiceDetails = (params) => {
    return request({
        url: '/api/blade-tms/billing/Settlement/statementInvoiceDetails',
        method: 'get',
        params: {
            ...params,
        }
    })
}